3.2543 \(\int \frac{(a+b x^n)^3}{x} \, dx\)

Optimal. Leaf size=50 \[ \frac{3 a^2 b x^n}{n}+a^3 \log (x)+\frac{3 a b^2 x^{2 n}}{2 n}+\frac{b^3 x^{3 n}}{3 n} \]

[Out]

(3*a^2*b*x^n)/n + (3*a*b^2*x^(2*n))/(2*n) + (b^3*x^(3*n))/(3*n) + a^3*Log[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0201271, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {266, 43} \[ \frac{3 a^2 b x^n}{n}+a^3 \log (x)+\frac{3 a b^2 x^{2 n}}{2 n}+\frac{b^3 x^{3 n}}{3 n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)^3/x,x]

[Out]

(3*a^2*b*x^n)/n + (3*a*b^2*x^(2*n))/(2*n) + (b^3*x^(3*n))/(3*n) + a^3*Log[x]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\left (a+b x^n\right )^3}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(a+b x)^3}{x} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (3 a^2 b+\frac{a^3}{x}+3 a b^2 x+b^3 x^2\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{3 a^2 b x^n}{n}+\frac{3 a b^2 x^{2 n}}{2 n}+\frac{b^3 x^{3 n}}{3 n}+a^3 \log (x)\\ \end{align*}

Mathematica [A]  time = 0.0242516, size = 41, normalized size = 0.82 \[ \frac{b x^n \left (18 a^2+9 a b x^n+2 b^2 x^{2 n}\right )}{6 n}+a^3 \log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)^3/x,x]

[Out]

(b*x^n*(18*a^2 + 9*a*b*x^n + 2*b^2*x^(2*n)))/(6*n) + a^3*Log[x]

________________________________________________________________________________________

Maple [A]  time = 0., size = 52, normalized size = 1. \begin{align*}{\frac{{b}^{3} \left ({x}^{n} \right ) ^{3}}{3\,n}}+{\frac{3\, \left ({x}^{n} \right ) ^{2}{b}^{2}a}{2\,n}}+3\,{\frac{b{a}^{2}{x}^{n}}{n}}+{\frac{{a}^{3}\ln \left ({x}^{n} \right ) }{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)^3/x,x)

[Out]

1/3/n*b^3*(x^n)^3+3/2/n*(x^n)^2*b^2*a+3*a^2*b*x^n/n+1/n*a^3*ln(x^n)

________________________________________________________________________________________

Maxima [A]  time = 0.983369, size = 65, normalized size = 1.3 \begin{align*} \frac{a^{3} \log \left (x^{n}\right )}{n} + \frac{2 \, b^{3} x^{3 \, n} + 9 \, a b^{2} x^{2 \, n} + 18 \, a^{2} b x^{n}}{6 \, n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x,x, algorithm="maxima")

[Out]

a^3*log(x^n)/n + 1/6*(2*b^3*x^(3*n) + 9*a*b^2*x^(2*n) + 18*a^2*b*x^n)/n

________________________________________________________________________________________

Fricas [A]  time = 1.31316, size = 99, normalized size = 1.98 \begin{align*} \frac{6 \, a^{3} n \log \left (x\right ) + 2 \, b^{3} x^{3 \, n} + 9 \, a b^{2} x^{2 \, n} + 18 \, a^{2} b x^{n}}{6 \, n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x,x, algorithm="fricas")

[Out]

1/6*(6*a^3*n*log(x) + 2*b^3*x^(3*n) + 9*a*b^2*x^(2*n) + 18*a^2*b*x^n)/n

________________________________________________________________________________________

Sympy [A]  time = 0.376683, size = 53, normalized size = 1.06 \begin{align*} \begin{cases} a^{3} \log{\left (x \right )} + \frac{3 a^{2} b x^{n}}{n} + \frac{3 a b^{2} x^{2 n}}{2 n} + \frac{b^{3} x^{3 n}}{3 n} & \text{for}\: n \neq 0 \\\left (a + b\right )^{3} \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)**3/x,x)

[Out]

Piecewise((a**3*log(x) + 3*a**2*b*x**n/n + 3*a*b**2*x**(2*n)/(2*n) + b**3*x**(3*n)/(3*n), Ne(n, 0)), ((a + b)*
*3*log(x), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b x^{n} + a\right )}^{3}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^3/x, x)